<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:f="http://java.sun.com/jsf/core"      
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:a4j="http://richfaces.org/a4j"
      xmlns:rich="http://richfaces.org/rich">
      
<ui:composition template="/restrito/template.xhtml">

<ui:define name="menu"><ui:include src="menu.xhtml"/></ui:define>

<ui:define name="corpo">
	<h:outputScript library="js" name="descadastrarempresa.js" target="head" />
    <div class="container">
    <ui:include src="../mensagem.xhtml"/>
    <h:form id="f" styleClass="form-horizontal">
    	<fieldset>
    	<legend>Descadastramento de usuário</legend>
        <div class="control-group">
  			<h:outputLabel for="motivo" value="* Qual o motivo do seu descadastramento?" styleClass="control-label"/>
  			<div class="controls">
				<h:selectOneMenu id="motivo" value="#{descadastrarEmpresaMB.usuarioDescadastrado.motivo}" required="true" styleClass="input-xlarge">
					<f:selectItems value="#{selectItemMB.lsMotivoDescadastramento}"/>
				</h:selectOneMenu>
				<rich:message for="motivo" />
  			</div>
		</div>
        <div class="control-group" id="divMotivoOutro" style="display:none">
  			<h:outputLabel for="motivoOutro" value="* Qual outro motivo?" styleClass="control-label"/>
  			<div class="controls">
  				<h:inputTextarea id="motivoOutro" value="#{descadastrarEmpresaMB.usuarioDescadastrado.motivoOutro}" required="#{param['f:motivo'] == 'O'}" styleClass="input-xlarge" rows="3">
  					<f:validateLength maximum="100" />
  				</h:inputTextarea>
				<rich:message for="motivoOutro" />
  			</div>
		</div>
		</fieldset>
		<div class="form-actions">
			<h:commandButton action="#{descadastrarEmpresaMB.descadastrar}" value="Descadastrar" styleClass="btn-large btn-primary"/>
		</div>
	</h:form>
	</div>
</ui:define>
</ui:composition>
</html>
